<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function num(a) {
            return (a % 2 == 0) ? true : false;
        }
        document.write(num(4));
        console.log(num(5));
        
        document.write("<br>");
        var prime = function (a) {
            for (var i = 2; i < a; i++) {
                if (a % 2 == 0) {
                    return false;
                }else{
                    return true;
                }
            }
        }
        document.write(prime(10));
        console.log(prime(11));
        
        
    </script>
</body>

</html>